<?php
use Encore\Admin\Grid;
use Encore\Admin\Form;
/**
 * Laravel-admin - admin builder based on Laravel.
 * @author z-song <https://github.com/z-song>
 *
 * Bootstraper for Admin.
 *
 * Here you can remove builtin form field:
 * Encore\Admin\Form::forget(['map', 'editor']);
 *
 * Or extend custom form field:
 * Encore\Admin\Form::extend('php', PHPEditor::class);
 *
 * Or require js and css assets:
 * Admin::css('/packages/prettydocs/css/styles.css');
 * Admin::js('/packages/prettydocs/js/main.js');
 *
 */

//Encore\Admin\Form::forget(['map', 'editor']);
//kang
Encore\Admin\Form::extend('scriptinjecter', Field\Interaction\ScriptInjecter::class);

Form::extend('editor', Encore\WangEditor\Editor::class);
Grid::init(function (Grid $grid) {

    $grid->disableRowSelector();

    $grid->disableColumnSelector();

//    $grid->disableExport();
    $grid->paginate(10);
    $grid->actions(function (Grid\Displayers\Actions $actions) {
        $actions->disableView();
        $actions->disableEdit();
        $actions->disableDelete();
    });
});
Admin::js('/vendor/laravel-admin/AdminLTE/plugins/select2/select2.full.min.js');
Admin::js('/vendor/laravel-admin/AdminLTE/plugins/select2/i18n/zh-CN.js');
Admin::js('/js/bootbox.min.js');